package com.lin.cms.domain;

import java.io.Serializable;

public class ContentTag implements Serializable {

	private static final long serialVersionUID = 1L;

	private int tagId;

	private String tagName;

	private int refCounter;

	public ContentTag() {
	}

	public int getTagId() {
		return tagId;
	}

	public void setTagId(int tagId) {
		this.tagId = tagId;
	}

	public String getTagName() {
		return tagName;
	}

	public void setTagName(String tagName) {
		this.tagName = tagName;
	}

	public int getRefCounter() {
		return refCounter;
	}

	public void setRefCounter(int refCounter) {
		this.refCounter = refCounter;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + tagId;

		return result;
	}
	
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		final ContentTag other = (ContentTag) obj;
		if (tagId != other.tagId)
			return false;

		return true;
	}
	
	@Override
	public String toString() {
		return getClass().getName() + "@" + Integer.toHexString(hashCode()) + 
			"(" + 
			"tagId=" + "'" + tagId + "'" + 
			")";
	}
	
}
